package org.jeecg.modules.renyGj.job;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.hkvs.HaikService;
import org.jeecg.modules.hkvs.HaikYitstjg;
import org.jeecg.modules.hkvs.HaikZhuaPData;
import org.jeecg.modules.renyGj.entity.AgRenygj;
import org.jeecg.modules.renyGj.service.IAgRenygjService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Slf4j
public class SyncRenlsbjl implements Job {
    @Autowired
    private IAgRenygjService agRenygjService;

    @Autowired
    HaikService haikService;

    @SneakyThrows
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info(String.format("同步人脸识别记录，任务执行了，时间:" + DateUtils.formatDateTime()));
        long t1 = System.currentTimeMillis();
        agRenygjService.syncData();
        long t2 = System.currentTimeMillis();
        log.info(" 同步人脸识别记录，任务执行结束了，执行时间:" + (t2-t1));
    }
}
